package com.alliky.home.ui.adapter

import android.widget.ImageView
import coil.load
import com.alliky.home.R
import com.rrc.common.entity.GoodsVO
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

/**
 * ================================================
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2022/11/23 17:29
 * ================================================
 */
class HomeHotAdapter(data: MutableList<GoodsVO>?) :
    BaseQuickAdapter<GoodsVO, BaseViewHolder>(R.layout.item_home_hot_layout, data) {
    override fun convert(helper: BaseViewHolder, item: GoodsVO?) {
        helper.setText(R.id.tv_name, item?.goods_name)
        helper.setText(R.id.tv_price, "￥" + item?.goods_price)
        helper.getView<ImageView>(R.id.iv_image).load(item?.goods_thumb)
    }
}